<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

include '../AccesoDatos/DaoVacuna.php';
    
    $tc = $_REQUEST['tc'];

    if($tc == 1){
        
      $Nombre = utf8_decode($_REQUEST['Nombre']);
      $Descripcion = utf8_decode($_REQUEST['Descripcion']); 
      
      $GuardarVacuna = new DaoVacuna("", $Nombre, $Descripcion);
      $GuardarVacuna ->GuardarVacuna();
      
    }
    if($tc == 2){
        
        $ConsultarVacunas = new DaoVacuna("", "", "");
        $ConsultarVacunas ->ConsultarVacuna();
    }
    if($tc == 3){
       
      $OidVacuna = $_REQUEST['Oid'];
      $Nombre = utf8_decode($_REQUEST['Nombre']);
      $Descripcion = utf8_decode($_REQUEST['Descripcion']); 
      
      $EditarVacuna = new DaoVacuna($OidVacuna, $Nombre, $Descripcion);
      $EditarVacuna ->EditarVacuna();
    }
    if($tc == 4){
        
        $Oid = $_REQUEST['Oid'];
        
        $ConsultarVacunas = new DaoVacuna("", "", "");
        $ConsultarVacunas ->ConsultarVacunaEstudiante($Oid);
    }
?>
